
package com.shop.cloud.mall.common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import io.swagger.v3.oas.annotations.media.Schema;


/**
 * 会员用户
 *
 * @author
 * @date 2024-04-02 15:22:47
 */
@Data
@TableName("vip_user")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "会员用户")
public class VipUser extends Model<VipUser> {
    private static final long serialVersionUID=1L;

    /**
     * PK
     */
    @TableId(type = IdType.ASSIGN_ID)
    @NotNull(message = "PK不能为空")
    @Schema(description = "PK")
    private String id;
    /**
     * 所属租户
     */
    @NotNull(message = "所属租户不能为空")
    @Schema(description = "所属租户")
    private String tenantId;
    /**
     * 逻辑删除标记（0：显示；1：隐藏）
     */
    @NotNull(message = "逻辑删除标记（0：显示；1：隐藏）不能为空")
    @Schema(description = "逻辑删除标记（0：显示；1：隐藏）")
    private String delFlag;
    /**
     * 创建时间
     */
    @NotNull(message = "创建时间不能为空")
    @Schema(description = "创建时间")
    private LocalDateTime createTime;
    /**
     * 最后更新时间
     */
    @NotNull(message = "最后更新时间不能为空")
    @Schema(description = "最后更新时间")
    private LocalDateTime updateTime;
    /**
     * 用户ID
     */
    @NotNull(message = "用户ID不能为空")
    @Schema(description = "用户ID")
    private String userId;
    /**
     * 会员类型ID
     */
    @NotNull(message = "会员类型ID不能为空")
    @Schema(description = "会员类型ID")
    private String vipTypeId;
    /**
     * 结束时间
     */
    @NotNull(message = "结束时间不能为空")
    @Schema(description = "结束时间")
    private LocalDateTime endTime;
    /**
     * 累积折扣金额
     */
    @NotNull(message = "累积折扣金额不能为空")
    @Schema(description = "累积折扣金额")
    private BigDecimal totalDiscountAmount;
    @TableField(exist = false)
    private UserInfo userInfo;
}
